package STUDENT.NGUYENSANG.OOPs.Calculato;
import java.util.Scanner;
public class Views {
	public static void main(String[] argns)
	{
		Scanner input=new Scanner(System.in);
		ToanTu TT=new ToanTu();
		Modouls MD=new Modouls();
		System.out.println("Nhap cac gia tri a, b");
		double a=0.00;
		double b=0.00;
		a=input.nextDouble();
		b=input.nextDouble();
		TT.setA(a);
		TT.setB(b);
		System.out.println("Nhap phep toan can tinh:");
		int c=0;
		c=input.nextInt();
		switch(c)
		{
		case 0:
			System.out.println("Tong a+b: "+MD.Cong(TT));
			break;
		case 1:
			System.out.println("Hieu a-b: "+MD.Tru(TT));
			break;
		case 2:
			System.out.println("Tich a*b: "+MD.Nhan(TT));
			break;
		case 3:
			if(TT.getB()==0)
			{
				System.out.println("Eror!!!");
				break;
			}
			else
			{
				System.out.println("Thuong a/b: "+MD.Chia(TT));
			}
		}
	}
}
